package javacore.abstraction;

public class InstanceOf {

	public static void main(String[] args) {
		Integer i;
		
		i = new Integer(10);
		if (i instanceof Integer) {
			System.out.println("This is Integer : " + i.intValue());
		}
		
		Number n;
		
		n = new Integer(20);
		if (n instanceof Integer) {
			System.out.println("This is Integer : " + n.intValue());
		}
		
		n = new Float(20.1);
		
		if (n instanceof Float) {
			System.out.println("This is Float : " + n.floatValue());
		}
	}

}
